 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>刮刮乐活动</title>
    <link href="${base}/resource/admin/css/common.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="${base}/resource/admin/js/jquery.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/js/common.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/js/list.js"></script>
    <script type="text/javascript">
        $().ready(function() {
        [@flash_message /]
        });
    </script>
</head>
<body>
<!-- 地址导航-->
<div class="path">
    <a href="/admin/main.do">首页</a> &raquo;刮刮乐活动列表<span>总记录数:${page.total}</span>
</div>
<form id="listForm" action="list.do" method="get">
    <div class="bar">
        <a href="add.do" class="iconButton">
            <span class="addIcon">&nbsp;</span>添加
        </a>
        <a href="javascript:;" id="deleteButton" class="iconButton disabled">
            <span class="deleteIcon">&nbsp;</span>删除
        </a>
        <div class="buttonWrap">
            <a href="javascript:;" id="refreshButton" class="iconButton">
                <span class="refreshIcon">&nbsp;</span>刷新
            </a>
            <div class="menuWrap">
                <a href="javascript:;" id="pageSizeSelect" class="button">
                    每页条数<span class="arrow">&nbsp;</span>
                </a>
                <div class="popupMenu">
                    <ul id="pageSizeOption">
                        <li>
                            <a href="javascript:;"[#if page.numPerPage == 10] class="current"[/#if] val="10">10</a>
                        </li>
                        <li>
                            <a href="javascript:;"[#if page.numPerPage == 20] class="current"[/#if] val="20">20</a>
                        </li>
                        <li>
                            <a href="javascript:;"[#if page.numPerPage == 50] class="current"[/#if] val="50">50</a>
                        </li>
                        <li>
                            <a href="javascript:;"[#if page.numPerPage == 100] class="current"[/#if] val="100">100</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <table id="listTable" class="list">
        <tr>
            <th class="check">
                <input type="checkbox" id="selectAll" />
            </th>
            <th>
                <span>标题</span>
            </th>
            <th>
            <span>内容</span>
        </th>

            <th>
                <span>活动时间</span>
            </th>
            <th>
                <span>活动类型</span>
            </th>
            <th>
                <span>是否开启</span>
            </th>
            <th>
                <span>所需宝币</span>
            </th>
            <th>
                <span>活动id</span>
            </th>
            <th>
                <span>操作</span>
            </th>

        </tr>
        [#list page.content as gglhd]
        <tr>
            <td>
                <input type="checkbox" name="ids" value="${gglhd.id}" />
            </td>
            <td>
			${gglhd.name}
            </td>
            <td>
			${gglhd.content}
            </td>

            <td>
            ${gglhd.startDate?string("yyyy-MM-dd 00:00:00")}-- ${gglhd.endDate?string("yyyy-MM-dd 23:59:59")}
            </td>
            <td>
                [#if gglhd.type=="1"]
                    <span style="color: #cc0000;">大转盘</span>[#else]刮刮乐
                [/#if]
            </td>

            <td>
                [#if gglhd.status=="1"]
                <span style="color: #cc0000;">是</span>[#else]否
                [/#if]
            </td>
            <td>
                ${gglhd.virtualCurrency}
            </td>
            <td>
            ${gglhd.id}
            </td>
            <td>
                [#if gglhd.status=="1"]
                <a href="OffGgl.do?id=${gglhd.id}"><span style="color: #cc0000;">[关闭]</span></a>[#else] <a href="OnGgl.do?id=${gglhd.id}">[开启]</a>
                [/#if]
           <a href="edit.do?id=${gglhd.id}">[编辑]</a>
                <a href="/ggljp/list.do?Id=${gglhd.id}">[奖品编辑]</a>

            </td>

        </tr>
        [/#list]
    </table>
    [@pagination pageNumber = page.numPerPage totalPages = page.totalPages]
    [#include "/common/pagination.ftl"]
    [/@pagination]
</form>
</body>
</html>